package com.basic.business.demo;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：huage
 * @date ：Created in 2021/7/20 16:40
 * @description： 测试范例
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemoController {

    @Autowired
    private RedisTemplate redisTemplate;

    /**
     * redis测试
     */
    @Test
    public void test(){
        redisTemplate.opsForValue().set("name","花哥");
        System.out.println(redisTemplate.opsForValue().get("name"));
    }
}
